package com.nvwa.stater.logback.preparam;

import org.slf4j.MDC;

import java.util.Map;

public interface LogPreparamProvider {

    /**
     * 将预设参数放到MDC中
     */
    default void putPreparamMdc() {
        String preParam = PreparamUtil.convertToStr(initPreparamMap());
        MDC.put(PreparamUtil.PRE_PARAM, preParam);
    }

    default Map<String, String> initPreparamMap() {
        return null;
    }

    class DefProvider implements LogPreparamProvider {
    }

}
